﻿<%@ Page Title="" Language="C#" MasterPageFile="~/shop/MasterPage.master" AutoEventWireup="true" CodeFile="UserInformation.aspx.cs" Inherits="shop_UserInformation" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .auto-style5 {
            margin-left: 0px;
        }
        .auto-style6 {
            text-align: left;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:keshe2ConnectionString %>" DeleteCommand="DELETE FROM [客户] WHERE [客户编号] = @客户编号" InsertCommand="INSERT INTO [客户] ([客户编号], [客户名], [密码], [地址], [手机号]) VALUES (@客户编号, @客户名, @密码, @地址, @手机号)" SelectCommand="SELECT * FROM [客户]" UpdateCommand="UPDATE [客户] SET [客户名] = @客户名, [密码] = @密码, [地址] = @地址, [手机号] = @手机号 WHERE [客户编号] = @客户编号">
        <DeleteParameters>
            <asp:Parameter Name="客户编号" Type="Int64" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="客户编号" Type="Int64" />
            <asp:Parameter Name="客户名" Type="String" />
            <asp:Parameter Name="密码" Type="String" />
            <asp:Parameter Name="地址" Type="String" />
            <asp:Parameter Name="手机号" Type="String" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="客户名" Type="String" />
            <asp:Parameter Name="密码" Type="String" />
            <asp:Parameter Name="地址" Type="String" />
            <asp:Parameter Name="手机号" Type="String" />
            <asp:Parameter Name="客户编号" Type="Int64" />
        </UpdateParameters>
    </asp:SqlDataSource>
    <div class="auto-style6">
        <asp:Label ID="Label1" runat="server" Text="查询类别："></asp:Label>
        <asp:DropDownList ID="DropDownList1" runat="server">
            <asp:ListItem>客户编号</asp:ListItem>
            <asp:ListItem>客户名</asp:ListItem>
            <asp:ListItem>地址</asp:ListItem>
            <asp:ListItem>手机号</asp:ListItem>
        </asp:DropDownList>
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="查询" />
        <br />
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" CellPadding="4" CssClass="auto-style5" DataKeyNames="客户编号" DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None" Width="1150px">
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        <Columns>
            <asp:CommandField ShowEditButton="True" />
            <asp:BoundField DataField="客户编号" HeaderText="客户编号" ReadOnly="True" SortExpression="客户编号" />
            <asp:BoundField DataField="客户名" HeaderText="客户名" SortExpression="客户名" />
            <asp:BoundField DataField="密码" HeaderText="密码" SortExpression="密码" />
            <asp:BoundField DataField="地址" HeaderText="地址" SortExpression="地址" />
            <asp:BoundField DataField="手机号" HeaderText="手机号" SortExpression="手机号" ReadOnly="True" />
        </Columns>
        <EditRowStyle BackColor="#999999" />
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#E9E7E2" />
        <SortedAscendingHeaderStyle BackColor="#506C8C" />
        <SortedDescendingCellStyle BackColor="#FFFDF8" />
        <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
    </asp:GridView>
    </div>
</asp:Content>

